<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            border: solid;

        }
        .main  {
            width: 600px;
            height: 600px;
            display: flex;
            flex-direction: column;
        }
        .top, .bottom {
            flex-basis: 100px;
        }
        .middle {
            flex-grow: 1;
        }
    </style>
</head>
<body>
    <div class="main">
        <div class="top">top</div>
        <div class="middle">middle</div>
        <div class="bottom">bottom</div>
    </div>
</body>
</html>